<?php $this->placeholder('onReady')->captureStart() ?>
$("#myTable").tablesorter(); 

$('a.button').button();


$(document).on("click",'.tareasdelete', function(e){
    	e.preventDefault();
    	var url=this.href;
        var tr = $(this).closest('li');
       
    	$('#dialog-confirm').dialog({buttons: { 
				"Borrar": function() {
					$.post(url,  function(data){
						if(data.status=='ok'){
						    $('#dialog-confirm').dialog("close");  
							tr.hide();
							
						}
						else
						{
							alert(data);
							$('#dialog-confirm').dialog("close");
						}
					})
				} ,
				"Cancelar": function() { $(this).dialog("close"); } 
			}
		})
	    .dialog('open');  
    })
    
    $('.tareasdelete').css('cursor','pointer')
    .button({
            text: false,
            icons: {
                primary: "ui-icon-trash"
            }
    });






<?php $this->placeholder('onReady')->captureEnd() ?>
<?$this->headScript()->offsetSetFile(100,$this->baseUrl('js/jquery.lightbox.js'));?>

<?$this->headLink()->appendStylesheet($this->baseUrl('css/lightbox.css'));?>


<?echo $this->partial('snnipet/head.phtml',array('msg'=>$this->pep['pep'].' '.$this->pep['razon_social']))?>

<div class="contenedor_tablesorter">

<table width="100%" class="tabla_descriptiva_proyecto">
<caption><?=$this->editarFila('pep',$this->id_pep);?></caption>
<tbody>
<tr>
	<th class="ui-state-hover" width="25%"><?php echo $this->translate('PEP');?></th>
    <td width="25%" class="ui-state-highlight"><?=$this->pep['pep']?></td>
	<th class="ui-state-hover"><?php echo $this->translate('Fecha Inicio');?></th>
    <td class="ui-state-highlight"><?=$this->dateTo($this->pep['fecha_inicio'])?></td>
</tr>	
<tr>
	<th class="ui-state-hover" width="25%"><?php echo $this->translate('Cliente');?>&nbsp;</th>
    <td width="25%" class="ui-state-highlight"><?=$this->pep['codigo']?> <?=$this->pep['razon_social']?>&nbsp;</td>
	<th class="ui-state-hover"><?php echo $this->translate('Fecha Fin(Inicial)');?>&nbsp;</th>
    <td class="ui-state-highlight"><?=$this->dateTo($this->pep['fecha_fin'])?>&nbsp;</td>
</tr>	
<tr>
	<th class="ui-state-hover"><?php echo $this->translate('Jefe de Proyecto');?>&nbsp;</th>
    <td class="ui-state-highlight"><?=$this->user($this->pep['id_jp'])?>&nbsp;</td>
	<th class="ui-state-hover"><?php echo $this->translate('Fecha Fin (Renovacion)');?>&nbsp;</th>
    <td class="ui-state-highlight"><?=$this->dateTo($this->pep['fecha_renovacion'])?>&nbsp;</td>
</tr>
<tr>
	<th class="ui-state-hover"><?php echo $this->translate('CIF');?>&nbsp;</th>
    <td class="ui-state-highlight"><?=$this->pep['cif']?>&nbsp;</td>
	<th class="ui-state-hover"><?php echo $this->translate('Fecha Aviso');?>&nbsp;</th>
    <td class="ui-state-highlight"><?=$this->dateTo($this->pep['fecha_aviso'])?>&nbsp;</td>
</tr>	
<tr>
	<th class="ui-state-hover"><?php echo $this->translate('Dirección');?>&nbsp;</th>
    <td class="ui-state-highlight"><?=$this->pep['domicilio']?>&nbsp;</td>
	<th class="ui-state-hover"><?php echo $this->translate('Fecha Ipc');?>&nbsp;</th>
    <td class="ui-state-highlight"><?=$this->dateTo($this->pep['fecha_ipc'])?>&nbsp;</td>
</tr>
</tbody>		
</table>


<table width="100%" class="tabla_descriptiva_proyecto">
<tbody>
<tr>
	<th class="ui-state-hover"><?php echo $this->translate('VCO');?>&nbsp;</th>
    <td class="ui-state-highlight"><?=$this->numEs($this->pep['vfo'],0)?>&nbsp;</td>
	<th class="ui-state-hover" width="25%"><?php echo $this->translate('Gestión MCI');?>&nbsp;</th>
    <td width="25%" class="ui-state-highlight"><?=$this->pep['cc_mci_text']?>&nbsp;</td>

</tr>	
<tr>
	<th class="ui-state-hover"><?php echo $this->translate('CFO');?>&nbsp;</th>
    <td class="ui-state-highlight"><?=$this->numEs($this->pep['cfo'],0)?>&nbsp;</td>
	<th class="ui-state-hover" width="25%"><?php echo $this->translate('Ponderación %');?>&nbsp;</th>
    <td width="25%" class="ui-state-highlight"><?=$this->numEs($this->pep['ponderacion'])?>&nbsp;</td>

</tr>	
<tr>
	<th class="ui-state-hover"><?php echo $this->translate('MFO');?>&nbsp;</th>
    <td class="ui-state-highlight"><?=$this->numEs($this->pep['mfo'],2)?>&nbsp;</td>
	<th class="ui-state-hover">&nbsp;</th>
    <td class="ui-state-highlight">&nbsp;</td>

</tr>

</tbody>		
</table>

<?echo $this->partial('snnipet/atencion.phtml',array('msg'=>$this->pep['notas'],'title'=>'Notas'))?>




<table width="100%" class="caja_descriptiva">
 <tr><th colspan="10" class="ui-widget-header" style="height: 20px;text-align:left">(<?=count($this->proyectos)?>) Proyectos Alojamiento</th></tr>    
 <?if(!empty($this->proyectos)):?>
    <tr>
      <th><?php echo $this->translate('Datacenter');?></th>
      <th><?php echo $this->translate('Proyecto');?></th>
      <th><?php echo $this->translate('Sala');?></th>
      <th><?php echo $this->translate('Plano');?></th>
      <th><?php echo $this->translate('Superficie');?></th>
      <th><?php echo $this->translate('Racks');?></th>
    </tr>
  
    <?foreach($this->proyectos as $proyecto):?>
    <tr>
      <td><?=$this->zona($proyecto['id_zona'])?>&nbsp;</td>
      <td><?=$this->anchor("proyecto/ficha/idZona/{$proyecto['id_zona']}/id_proyecto/{$proyecto['id']}",$proyecto['nombre'])?>&nbsp;</td>
      <td><?=$proyecto['sala'];?>&nbsp;</td>
      <td>&nbsp;<?php echo $this->getFile($this->proyecto['file'],'plano');?></td> 
      <td><?=$this->numEs($proyecto['sup_contr'])?>&nbsp;</td>
      <td><?=$this->numEs($proyecto['racks'],0)?>&nbsp;</td>
    </tr>
    <?endforeach?>
    <?else:?>
  <tr><td colspan="10"><?php echo $this->translate('No hay Proyectos');?></td></tr>
  <?endif?>
</table>



<!--
<table width="100%" class="caja_descriptiva">
 <tr><th colspan="10" class="ui-widget-header" style="height: 20px;text-align:left">(<?=count($this->proyectos)?>) MMR</th></tr>    
 <?if(!empty($this->mmr)):?>
    <tr>
      <th><?php echo $this->translate('Datacenter');?></th>
      <th><?php echo $this->translate('Proyecto');?></th>
      <th><?php echo $this->translate('Adendum Firmado');?></th>
      <th><?php echo $this->translate('Tramo');?></th>
      <th><?php echo $this->translate('Posiciones Totales');?></th>
      <th><?php echo $this->translate('Posiciones Libres');?></th>

    </tr>
  
    <?foreach($this->mmr as $proyecto):?>
    <tr>
      <td><?=$this->zona($proyecto['id_zona'])?>&nbsp;</td>
      <td><?=$this->anchor("index.php?modulo=Servicios_PosicionesBasico&idZona={$proyecto['id_zona']}&buscar_x=on&id_proyecto={$proyecto['id']}",$proyecto['nombre'])?>&nbsp;</td>
      
      <td><?=$proyecto['adendum']?>&nbsp;</td>
      <td><?=$proyecto['tramo_proyecto']?>&nbsp;</td>

         <td>
      <?foreach($proyecto['posicion'] as $k=>$v) print $this->anchor("index.php?modulo=Servicios_PosicionesBasico&idZona={$proyecto['id_zona']}&id_proyecto={$proyecto['id']}&buscar_x=on&id_tipo={$v['id_tipo']}",'<strong>['.$v['c'].']</strong> '.$k.'<br>',null,false);?>
   </td>
   <td>
      <?foreach($proyecto['posicion_libre'] as $k=>$v) print $this->anchor("index.php?modulo=Servicios_PosicionesBasico&idZona={$proyecto['id_zona']}&id_proyecto={$proyecto['id']}&buscar_x=on&id_tipo={$v['id_tipo']}&estado1=l",'<strong>['.$v['c'].']</strong> '.$k.'<br>',null,false);?>
   </td>
     
    </tr>
    <?endforeach?>
    <?else:?>
  <tr><td colspan="10"><?php echo $this->translate('No hay Proyectos');?></td></tr>
  <?endif?>
 </table>

-->
<br /><br /><br />
<?echo $this->partial('snnipet/head.phtml',array('msg'=>'Bitácora'))?>


<?php echo $this->anchor('pep-post/insertar/id_pep/'.$this->id_pep,'Añadir',array('class'=>'utiladd'));?>


<?php echo $this->partialLoop($this->controllerName.'/fila2.phtml', (array)$this->posts); ?>
</div>